package com.zxcl.feign.sentinel;

import com.zxcl.constant.BusinessEnum;
import com.zxcl.domain.Sku;
import com.zxcl.feign.OrderProdFeign;
import com.zxcl.model.ChangeStock;
import com.zxcl.model.Result;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Log4j2
public class OrderProdFeignSentinel implements OrderProdFeign {
    /**
     * 根据skuIds拿SKU的信息
     *
     * @param skuIds
     * @return
     */
    @Override
    public Result<List<Sku>> getSkusByIds(List<Long> skuIds) {
        log.error("远程调用订单模块根据skuIds拿SKU的信息失败:{}", skuIds);
        return Result.fail(BusinessEnum.SERVER_INNER_ERROR);
    }

    /**
     * 修改库存
     *
     * @param changeStock
     * @return
     */
    @Override
    public Result<Boolean> changeStocks(ChangeStock changeStock) {
        return null;
    }
}
